<div class="col-xs-1 label label-lg label-info arrowed-in arrowed-right">
	<b>模块</b>
</div>
<div class="col-xs-5 label label-lg label-success arrowed-in arrowed-right">
	<b>模块下权限</b>
</div>
<div class="col-sm-6">
	<!-- #section:elements.tab.position -->

	<div class="tabbable tabs-left">
		<ul class="nav nav-tabs" id="myTab3" style="width: 140px;">
			<?php 
				foreach($controllerMap as $c){				  	
					echo "<li>		
						<a href=\"index.php?r=rbac/addoperation&controllerName=".$c['fileName']."\">".$c['description']."</a>
					</li>";			
				} 
				
			?>
			
		</ul>

		<div class="tab-content">
			<form action="index.php?r=rbac/addpermission" method="post">
			<?php 
				//获取URL传递的控制器名称
				
				 $controllerName=(Yii::$app->request->get('controllerName'))?substr(strtolower(Yii::$app->request->get('controllerName')), 0,-10):"main";
				 foreach($operation as $o){
					
					$actionName=substr(strtolower($o['methodName']), 0);
										
					echo "<label>
						<input name=\"operation[]\"  class=\"ace ace-checkbox-2\" type=\"checkbox\" value=\"$actionName@".$o['description']."\" />
						<span class=\"lbl\">".$o['description']."</span>
					</label><br />";
				}  
				echo "<input type=\"hidden\" name=\"controller\" value=\"".$controllerName."\" />"; 
			?>
			<br />
			<div>
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					建立操作
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
			
			</form>
		</div>
	</div>

	<!-- /section:elements.tab.position -->
</div>